/*******************************************************************************
 * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *  Eurotech
 *******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.11.25 at 06:05:15 PM CET
//

package org.eclipse.kura.core.configuration.metatype;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.xml.namespace.QName;

import org.eclipse.kura.configuration.metatype.Designate;
import org.w3c.dom.Element;

/**
 * <p>
 * Java class for Tdesignate complex type.
 *
 * <p>
 * The following schema fragment specifies the expected content contained within this class.
 *
 * <pre>
 * &lt;complexType name="Tdesignate">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="Object" type="{http://www.osgi.org/xmlns/metatype/v1.2.0}Tobject"/>
 *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *       &lt;attribute name="pid" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="factoryPid" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="bundle" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
 *       &lt;attribute name="merge" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
 *       &lt;anyAttribute/>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 *
 *
 */

public class Tdesignate implements Designate {

    protected Tobject object;
    protected List<Object> any;
    protected String pid;
    protected String factoryPid;
    protected String bundle;
    protected Boolean optional;
    protected Boolean merge;
    private final Map<QName, String> otherAttributes = new HashMap<>();

    /**
     * Gets the value of the object property.
     *
     * @return
     *         possible object is
     *         {@link Tobject }
     *
     */
    @Override
    public Tobject getObject() {
        return this.object;
    }

    /**
     * Sets the value of the object property.
     *
     * @param value
     *            allowed object is
     *            {@link Tobject }
     *
     */
    public void setObject(Tobject value) {
        this.object = value;
    }

    /**
     * Gets the value of the any property.
     *
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the any property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     *
     * <pre>
     * getAny().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link Element }
     * {@link Object }
     *
     *
     */
    public List<Object> getAny() {
        if (this.any == null) {
            this.any = new ArrayList<>();
        }
        return this.any;
    }

    /**
     * Gets the value of the pid property.
     *
     * @return
     *         possible object is
     *         {@link String }
     *
     */
    @Override
    public String getPid() {
        return this.pid;
    }

    /**
     * Sets the value of the pid property.
     *
     * @param value
     *            allowed object is
     *            {@link String }
     *
     */
    public void setPid(String value) {
        this.pid = value;
    }

    /**
     * Gets the value of the factoryPid property.
     *
     * @return
     *         possible object is
     *         {@link String }
     *
     */
    @Override
    public String getFactoryPid() {
        return this.factoryPid;
    }

    /**
     * Sets the value of the factoryPid property.
     *
     * @param value
     *            allowed object is
     *            {@link String }
     *
     */
    public void setFactoryPid(String value) {
        this.factoryPid = value;
    }

    /**
     * Gets the value of the bundle property.
     *
     * @return
     *         possible object is
     *         {@link String }
     *
     */
    @Override
    public String getBundle() {
        return this.bundle;
    }

    /**
     * Sets the value of the bundle property.
     *
     * @param value
     *            allowed object is
     *            {@link String }
     *
     */
    public void setBundle(String value) {
        this.bundle = value;
    }

    /**
     * Gets the value of the optional property.
     *
     * @return
     *         possible object is
     *         {@link Boolean }
     *
     */
    @Override
    public boolean isOptional() {
        if (this.optional == null) {
            return false;
        } else {
            return this.optional;
        }
    }

    /**
     * Sets the value of the optional property.
     *
     * @param value
     *            allowed object is
     *            {@link Boolean }
     *
     */
    public void setOptional(Boolean value) {
        this.optional = value;
    }

    /**
     * Gets the value of the merge property.
     *
     * @return
     *         possible object is
     *         {@link Boolean }
     *
     */
    @Override
    public boolean isMerge() {
        if (this.merge == null) {
            return false;
        } else {
            return this.merge;
        }
    }

    /**
     * Sets the value of the merge property.
     *
     * @param value
     *            allowed object is
     *            {@link Boolean }
     *
     */
    public void setMerge(Boolean value) {
        this.merge = value;
    }

    /**
     * Gets a map that contains attributes that aren't bound to any typed property on this class.
     *
     * <p>
     * the map is keyed by the name of the attribute and
     * the value is the string value of the attribute.
     *
     * the map returned by this method is live, and you can add new attribute
     * by updating the map directly. Because of this design, there's no setter.
     *
     *
     * @return
     *         always non-null
     */
    public Map<QName, String> getOtherAttributes() {
        return this.otherAttributes;
    }

}
